<template>
  <div ref="oContonier" class="contonier">
    <Loading :show="show"></Loading>
  </div>
</template>
<script>

export default {
  name: 'Index2',
  data() {
    return {
      show: true
    }
  },
  async mounted() {
    this.show = true;
    const elem = this.$refs.oContonier
    //  创建 image 接收元素
    const img = new Image();
    img.src = (await import("@/assets/images/index1.jpg")).default

    img.style.width = '100vw';
    img.style.height = 'auto'
    img.onload = (d) => {
      elem.appendChild(img)
      this.show = false;
    }

    img.onerror = () => {
      this.show = false;
      Toast.fail('加载失败')
    }
  }
}
</script>
<style lang="scss"></style>
